Fix installation of metapackages from repositories #4192
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problems
https://github.com/ProgrammerFailure/MyCKANMetaData/archive/main.tar.gz
The changeset appears, but when you confirm it, the install is skipped.
Causes
Accept
header toapplication/vnd.github+json
to download a source ZIP rather than a value that corresponds to a ZIP file type (!!!)https://docs.github.com/en/rest/repos/contents#download-a-repository-archive-zip
Changes
InstalledModule
will still be added to the registry even though no files are installed for a metapackage, so it can be upgraded when there are updates in the upstream repo. Immediate dependencies of a metapackage will be marked as non-auto-installed by default so the metapackage does not have to remain installed to keep the mods (since this is how "install from .ckan" currently works).GithubTransformer
will setdownload_content_type
toapplication/vnd.github+json
whenx_netkan_github.use_source_archive
is true, so clients will pass the mime type that GitHub foolishly requires for source ZIPsGUIMod.SetAutoInstallChecked
raises thePropertyChanged
event with an argument ofIsAutoInstalled
, whichManageMods
receives and handles by refreshing the changeset